(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    ["pages/main/storehouse/unpacking"], {
        "1ff5": function (t, n, e) {},
        "84eb": function (t, n, e) {
            "use strict";
            e.r(n);
            var i = e("a57c"),
                o = e("fb5d");
            for (var s in o)["default"].indexOf(s) < 0 && function (t) {
                e.d(n, t, (function () {
                    return o[t]
                }))
            }(s);
            e("f5af");
            var a = e("f0c5"),
                c = Object(a["a"])(o["default"], i["b"], i["c"], !1, null, "3cd77f82", null, !1, i["a"], void 0);
            n["default"] = c.exports
        },
        a57c: function (t, n, e) {
            "use strict";
            e.d(n, "b", (function () {
                return o
            })), e.d(n, "c", (function () {
                return s
            })), e.d(n, "a", (function () {
                return i
            }));
            var i = {
                    uniForms: function () {
                        return Promise.all([e.e("common/vendor"), e.e("components/uni-forms/uni-forms")]).then(e.bind(null, "0933"))
                    },
                    uniFormsItem: function () {
                        return e.e("components/uni-forms-item/uni-forms-item").then(e.bind(null, "4828"))
                    },
                    uniEasyinput: function () {
                        return Promise.all([e.e("common/vendor"), e.e("components/uni-easyinput/uni-easyinput")]).then(e.bind(null, "5dad"))
                    }
                },
                o = function () {
                    var t = this.$createElement;
                    this._self._c
                },
                s = []
        },
        c89d: function (t, n, e) {
            "use strict";
            (function (t) {
                Object.defineProperty(n, "__esModule", {
                    value: !0
                }), n.default = void 0;
                // var e = t.requireNativePlugin("wyQrCodeModule"),
                  var  i = {
                        data: function () {
                            return {
                                InputState: !0,
                                scanInState: !1,
                                isAutoScan: !1,
                                url: getApp().globalData.apiurl,
                                goodsname: "",
                                specifications: "",
                                model: {
                                    packetWeight: null
                                },
                                rules: {
                                    packetWeight: {
                                        rules: [{
                                            required: !0,
                                            errorMessage: "请输入单个小包重量"
                                        }]
                                    }
                                },
                                goodsno: "",
                                rkno: "",
                                weight: "",
                                type: 1
                            }
                        },
                        onLoad: function (t) {
                            this.init()
                        },
                        onUnload: function () {
                            this.stopScan(), this.release()
                        },
                        methods: {
                            init: function () {
                                var t = this;
                                e.initQrcode((function (n) {
                                    if (!n) return t.getToast("请重新登录系统！", !1)
                                }))
                            },
                            getToast: function (t, n) {
                                plus.nativeUI.toast('<font style="font-size:32px">' + t + "</font>", {
                                    verticalAlign: "center",
                                    type: "richtext",
                                    icon: n ? "/static/icon/success.png" : "/static/icon/error.png",
                                    duration: "short",
                                    richTextStyle: {
                                        align: "center",
                                        fontSrc: "static/font/...otf"
                                    }
                                })
                            },
                            StartScan: function () {
                                var t = this;
                                console.log("点击扫码事件"), this.InputState = !1, e.startScan(this.isAutoScan, (function (n) {
                                    if (t.scanInState) {
                                        if (!n) return t.getToast("失败！请联系管理员");
                                        t.handleScan(n)
                                    } else t.scanInState = !0
                                }))
                            },
                            handleScan: function (n) {
                                var e, i = this,
                                    o = n + "";
                                if (e = o.split("no="), 3 != e.length) return this.getToast("二维码无效！", !1);
                                this.goodsno = e[1], this.rkno = e[2], t.request({
                                    url: this.url + "receiptdoc/receiptdoc/list",
                                    method: "GET",
                                    data: {
                                        goodsno: this.goodsno,
                                        receiptdocno: this.rkno
                                    },
                                    success: function (t) {
                                        if (0 == t.data.total) return i.getToast("重复拆包！", !1);
                                        i.goodsname = t.data.rows[0].goodsName, i.specifications = t.data.rows[0].maintaintime, i.weight = t.data.rows[0].weight
                                    }
                                })
                            },
                            stopScan: function () {
                                e.stopScan()
                            },
                            release: function () {
                                e.releaseQrcode()
                            },
                            submitForm: function () {
                                var n = this;
                                getApp().globalData.userinfo.nickName;
                                if (console.log("tijao" + this.weight), "" == this.model.packetWeight || null == this.model.packetWeight || void 0 == this.model.packetWeight) return this.getToast("重量不能为空!", !1);
                                1e3 * this.weight % this.model.packetWeight * this.model.packetWeight > 30 && t.showModal({
                                    title: "提示",
                                    content: "当前拆包存在余量是否入库！",
                                    success: function (t) {
                                        t.confirm ? (this.type = 2, n.endSubmit()) : (this.type = 1, n.endSubmit())
                                    }
                                })
                            },
                            endSubmit: function () {
                                console.log("最终提交"), t.request({
                                    url: this.url + "recPacket/packet/unpacking",
                                    method: "POST",
                                    data: {
                                        receiptdocno: this.rkno,
                                        goodsno: this.goodsno,
                                        type: this.type,
                                        weight: this.model.packetWeight
                                    },
                                    success: function (t) {
                                        console.log("9999"), console.log(t)
                                    },
                                    complete: function () {
                                        t.switchTab({
                                            url: "/pages/main/index"
                                        })
                                    }
                                })
                            },
                            clearFrom: function () {
                                this.goodsname = "", this.specifications = "", this.weight = "", this.rkno = ""
                            }
                        }
                    };
                n.default = i
            }).call(this, e("543d")["default"])
        },
        f5af: function (t, n, e) {
            "use strict";
            var i = e("1ff5"),
                o = e.n(i);
            o.a
        },
        fb5d: function (t, n, e) {
            "use strict";
            e.r(n);
            var i = e("c89d"),
                o = e.n(i);
            for (var s in i)["default"].indexOf(s) < 0 && function (t) {
                e.d(n, t, (function () {
                    return i[t]
                }))
            }(s);
            n["default"] = o.a
        },
        fc8a: function (t, n, e) {
            "use strict";
            (function (t, n) {
                var i = e("4ea4");
                e("c150"), e("5c17"), e("a9ff");
                i(e("66fd"));
                var o = i(e("84eb"));
                t.__webpack_require_UNI_MP_PLUGIN__ = e, n(o.default)
            }).call(this, e("bc2e")["default"], e("543d")["createPage"])
        }
    },
    [
        ["fc8a", "common/runtime", "common/vendor"]
    ]
]);